package com.dg11185.nearshop.net.request;

import com.dg11185.libs.network.http.client.HttpRequest;
import com.dg11185.libs.utils.MD5.MD5Utils;
import com.dg11185.nearshop.app.Constants;
import com.dg11185.nearshop.net.NetUtils;
import com.dg11185.nearshop.net.response.CheckMemberResponse;

/**
 * 检测邮箱
 * 
 * @author wanliang527
 * @date 2014-4-29
 */
public class CheckEmailRequest extends HttpRequest<CheckMemberResponse> {

    public CheckEmailRequest(String email) {
        super(Constants.ADDRESS, Constants.checkEmail);
        addParam("email", email);
        addParam("chshToken", Constants.TOKEN);
        addParam("chshSign", MD5Utils.getMD5Str(getParams(), Constants.MD5_key));
    }

    @Override
    protected CheckMemberResponse parseJson(String response) throws Exception {
        CheckMemberResponse res = new CheckMemberResponse();
        res.parseJson(response);
        return res;
    }

}
